package top.zhmq.orderconsumer.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import top.zhmq.commonmodule.model.Userorder;
import top.zhmq.orderconsumer.hystrix.OrderServiceHystrix;

import java.util.List;

/**
 *
 *
 * @author Glory
 * @classname OrderService
 * @create 2021-06-07 22:15
 */

@Component
@FeignClient(value = "shop-order-provider", fallback = OrderServiceHystrix.class)
public interface OrderService {
    @RequestMapping(value = "/successOrder", method = RequestMethod.GET)
    public int successOrder(@RequestParam(value = "id") int id);

    @RequestMapping(value = "/cancelOrder", method = RequestMethod.GET)
    public int cancelOrder(@RequestParam(value = "id") int id);

    @RequestMapping(value = "/getAllorder")
    public List<Userorder> getAllorder(@RequestParam(value = "uid") int uid);

}
